namespace ITU.EtermCore
{
    using System;
    using System.Globalization;
    using System.IO;
    using System.Windows.Forms;

    internal class Log
    {
        public static void Write(string msg)
        {
            string path = Application.StartupPath + @"\log\";
            string str2 = DateTime.Now.ToString("yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo);
            path = path + str2 + ".log";
            try
            {
                FileStream stream = new FileStream(path, FileMode.Append);
                StreamWriter writer = new StreamWriter(stream);
                writer.Write(DateTime.Now.ToString() + ":" + msg + "\r\n");
                writer.Close();
                stream.Close();
            }
            catch
            {
            }
        }
    }
}
